package cq.com.cn.service;

import cq.com.cn.dao.UserDao;
import cq.com.cn.model.UserModel;

public class UserService {

    public UserModel queryUserWithEmail(String email){
        UserDao userDao=new UserDao();
        return userDao.findUserByEmail(email);
    }
    public void registerUser(UserModel user){
        UserDao userDao=new UserDao();
        userDao.insertUser(user);
    }
    public UserModel login(String loginName,String pwd){
        UserDao userDao=new UserDao();
        return  userDao.userLogin(loginName,pwd);
    }
}
